package com.example.rapichofer;

import utils.Constantes;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class Receptor extends BroadcastReceiver 
{
	@Override
	public void onReceive(Context context, Intent intent)
	{
		Log.i("LOG", "Receptor pasivo, llegó GCM.");
		
		Intent i = new Intent(Constantes.FILTER_GCM.CHOFER);
		i.putExtras(intent.getExtras());
		
		context.sendOrderedBroadcast(i, null);
	}
	/*@Override
	public void onReceive(Context context, Intent intent) 
	{
		Log.i("LOG", "Llego GCM.");
		
		ComponentName comp = new ComponentName(context.getPackageName(), GcmIntentService.class.getName());
		startWakefulService(context, intent.setComponent(comp));
		setResultCode(Activity.RESULT_OK);
	}*/
}
